package com.taotao.search.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.common.pojo.TaotaoResult;
import com.taotao.search.service.ItemService;

@Controller
@RequestMapping("/item")
public class ItemController {
	@Autowired
	private ItemService itemService;

	@RequestMapping("/importAll")
	public @ResponseBody TaotaoResult importAllItems() {
		return itemService.importAllItems();
	}

	@RequestMapping("/importOne")
	public @ResponseBody TaotaoResult importItem(Long id) {
		return itemService.importOne(id);
	}
}
